<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets" 
    xmlns:f="http://java.sun.com/jsf/core" 
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui">
    
    <h:head>
        <title>Editor</title>
    </h:head>

<h:body>
		
		<h:form id="form">
			<p:editor wi  />
			
			<textarea id="texto" name="texto" cols="80" rows="10" style="resize: none;" />
			
			<h:panelGrid columns="3" style="margin-top:10px">
				<p:commandButton id="submeter" value="Salvar" icon="ui-icon-disk" />
				<p:commandButton id="estatistica" value="Estatística" />
				<p:commandButton id="contador" value="Contador de palavras" action="#{editorManager.conta}" update="form"/>
			</h:panelGrid>

		<div id="tablePalavras">
		<h:form>
			<p:dataTable var="lista" paginator="true" rows="10" value="#{editorManager.mapa.entrySet()}" >
			  
		        <f:facet name="header">
		        	Lista de Palavras
		        </f:facet>
		        
		        <p:column headerText="Palavra">
		            
		        </p:column>

		        <p:column headerText="Qtd que aparece" >
		            
		        </p:column>

		    </p:dataTable>
		</h:form>
		</div>
		
		<div id="quantPalavaras" >
			<h:outputText value="Quantidade de palavras: #{editorManager.mapa.entrySet().size()}" />
		</div>

		</h:form>
		
</h:body>
</html>
